package com.hl.service;

import com.hl.mapper.AnnouncementMapper;
import com.hl.pojo.Announcement;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class AnnouncementServiceImpl implements AnnouncementService{
    @Autowired
    private AnnouncementMapper announcementMapper;

    @Override
    public Integer add(Announcement announcement) {
        return announcementMapper.add(announcement);
    }

    @Override
    public List<Announcement> findAll(Announcement announcement) {
        return announcementMapper.findAll(announcement);
    }
    @Override
    public Integer del(Integer id) {
        return announcementMapper.del(id);
    }

    @Override
    public Integer update( Announcement announcement) {
        return announcementMapper.update(announcement);
    }
    @Override
    public List<Announcement> findAll2(String name) {
       return announcementMapper.findAll2(name);
    }
}
